home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
functi1a
/
cfd.txt
next >
Wrap
Text File
|
1999-07-11
|
9KB
|
211 lines
Custom Form Designer/32 v1.0 FINAL
By Astynax of Function X
CONTENTS
1. What is CFD?
2. Other programs
3. Walkthrough
4. Advanced Crap
5. Tips and tricks
(1) WHAT IS CFD?
Custom Form Designer (CFD) is a MAJOR STEP in Visual Basic 32 Bit
development. This program lets you draw using arcs and lines the
outline of a form, then generates the code for your program as a
Visual Basic Module!
What are the advantages of having a custom form for your application?
* With appropriate graphics editing tools such as Adobe Photoshop or
JASC Paint Shop Pro, custom forms can make a very flashy interface
for your program within minutes, not hours of API programming.
The most time you will spend on while designing your custom form
will be making the background for it.
* NICE splash screens.
* Attractive interfaces to your programs draws in more people to them
for a first look then a standard "squared" program.
You're probably saying "Yeah, I want proof! I want proof of this
'magical program' made for the intermediate VB programmer that
performs crap that can only be done with some knowledge of API!"
The splash screen that starts when the program starts was designed
with CFD in final testing. That took 2 minutes to design. The
background FOR THE FORM took about 35 minutes to design.
(2) OTHER PROGRAMS AND ADVANTAGES OVER THEM
The only program I have seen that does something to the effect of this
is Thema's Polyform control. Their program requires you to include
an OCX file AND a text file containing all the coordinates WITH your
finished program. The interface supported only line drawing and
editing to make perfect was impossible. Doing SEPERATE SECTIONS
(explained in the TIPS and TRICKS guide) is absolutely impossible. But
you know what? I personally thought Thema's program was a boon to all
human beings on earth about 2 months ago! And it still is, in one
way - that custom-shaped forms are not a MUST for every program - but
they will sure rake in some interested users.
Why use CFD? Piece of cake!
* CFD generates a BAS file for your program that contains all the API
functions, complete instructions on how to get it working, and
even lets you edit the file before you save it using CFD's internal
text editor! There are no OCX files to include, or text files, or
anything - after saving the bas file, link it to your project, add
ONE (1) line of code to your Form_Load event, and the BAS does the
rest!
* CFD provides a professional yet easy to use interface and allows
for the drawing and editing of lines and arcs.
* CFD is FREEWARE. You obtain exclusive rights to the files generated
by CFD. This program is for the Visual Basic applications dev-
eloper in mind.
(3) WALKTHROUGH
Well, you want to learn the quick and easy way - why not the walk-
through?
First thing you should know is that the SHIFT key is a modifier tool -
this modifies the shapes of arcs only (for now). First, click on
TOOLS > LINE. This selects the line tool. Now, no matter what tool
you use, if there are no coordinates in the coordinate plane then the
first thing CFD does is starts you off with a starting coordinate.
Draw a few lines. Anywhere. Anytime. You'll notice drawing lines is
quite simple. OOPS! That last line you drew was a little off.
Make sure you have at least 10 lines drawn.
Select the last coordinate in the coordinate box (a red box will appear
where the last coordinate is to show you where that point is). Right-
click and select DELETE. A messagebox will appear to nag you, click
YES to delete that coordinate.
Well, it seems as if you also do not like the third, fifth, and last
two points you created, either. Well, in situations like these it's
quite simple to make CFD delete lots of points at once! Use the
SHIFT and CTRL keys in conjunction with the mouse to select and
deselect points. The point with the focus rectangle (a VERY LIGHT
rectangle around the last point you clicked) will determine where that
little red box is positioned at now. Right click and select delete
again, and select YES to the nag box.
Wow - you got some.... lines. Lines in a few neat spots too. Well,
let's try EDITING a point now. Select any point on the coordinate
list, right click and select EDIT (It's probably the one in BOLD.)
A box will pop up. When you press the APPLY button on the box, the
box will NOT go away - purposely to make perfecting a point's position
easy. Enter a number for the point's X and Y coordinates (remember,
the default scaling or BORDER values are 320 pixels by 240 pixels, so
going over them in effect will make something go off screen!) Click
APPLY until you feel that line is looking good, and close the box.
Now select ARC from the TOOL menu. Let's draw some arcs!
No matter how big the arc is, it is always 90 points. That means
if you want to delete the last arc drawn, you will have to select the
last 90 points from the coordinate box and delete them.
Select RESTART from the FILE menu to start a new drawing. Draw the
FIRST point near the top (Y) and middle (X) of the screen.
Now draw the second point near the middle (Y) and left (X) of the
screen. Now draw a point near the bottom middle of the screen.
WHAT HAPPENED? Messed up, huh? This is where the SHIFT key comes in.
Start a new file using RESTART and experiment with the shift key while
drawing arcs (make sure you are holding the shift key while you click
the mouse!) to get the hang of drawing arcs.
That's about it for the tutorial - next is the advanced functions.
A quick note - Resizing the form may make the coordinate table look
a little crappy (to say the least), but the end output is perfectly
smooth like how they describe it on Pampers commercials.
(4) ADVANCED CRAP
This section explains all options in detail.
MENU BAR
File
Restart Starts a new coordinate table, erasing any
pre-existing data.
Compile... Writes out a bas file according to your
coordinate table.
Exit Exits CFD.
Tools
Line LINE tool.
Arc Arc tool.
Properties Opens the Property sheet.
Coordinates
Add Exact Adds an exact point, which lets you directly
specify which X and Y values to go to.
Insert Inserts blank coordinates where the focus of
the coordinate table is.
Edit Point Edits the point where the focus of the coordinate
table is.
Delete Points Deletes all selected points.
Refresh Screen Redraw the picture.
Window These options are self explanatory.
PROPERTY SHEET
Scale width, height
This is the scaling with and height of the form, in pixels.
The API functions rely on pixel coordinates, so don't try to do any
scaling or drawing in twips. You HAVE been warned.
Rescale Objects
This keeps the size the same ON THE DRAWING but enlarges/reduces the
drawing by changing the points on the coordinate table.
Move to upperleft corner
This moves the drawing to the upper-left corner of the table. VERY
useful after a drawing has been completed and you want to make the
end executable program in VB smaller by making a smaller bitmap for
your program.
(5) TIPS AND TRICKS
SEPERATE SECTIONS
Yes, you can make SEPERATE SECTIONS - Parts of the form which are
NOT CONNECTED to another part of the form at all! This is a
pain-in-the-butt trick to do, since you MUST have the coordinates
ABSOLUTELY PERFECT.
Make the form how you want it. make a line going to where the seperate
section will start, draw the seperate section, and make the return line
to the program OVERLAP the first line to make it disappear! Sound
weird and confusing? Try it exactly how I said it (or at least try)
and it'll work.
MAKING A BITMAP THAT CORRESPONDS WITH YOUR FORM
This is slightly tricky. Add the module you saved to a project, and
in